const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}
module.exports = {
    lintOnSave: true,
    chainWebpack: (config) => {
      config.resolve.alias
      //set第一个参数：设置的别名，第二个参数：设置的路径
      .set('@',resolve('./src'))
      .set('components',resolve('./src/components'))
      .set('assets',resolve('./src/assets'))
      .set('views',resolve('./src/views'))
      .set('network',resolve('./src/network'))
      .set('utilsCommon',resolve('./src/utilsCommon'))
      //注意 store 和 router 不必配置
    }
  }